/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 23735
 * Date: 2022-09-29
 * Time: 22:56
 */
public class Main {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BTNode btNode=binaryTree.creatTree();
          //测试总节点数的计算
//        int size=binaryTree.size(btNode.left);
//        System.out.println(size);

          //测试叶子节点数的计算
//        int leafSize=binaryTree.getLeafCount(btNode.right);
//        System.out.println(leafSize);

          //测试第K层节点数
//        int kSize= binaryTree.getKSize(btNode,1);
//        System.out.println(kSize);

          //测试值为val的某个节点是否存在
//        BTNode node1=binaryTree.isExist(btNode,'A');
//        System.out.println(node1.val);
//        BTNode node2=binaryTree.isExist(btNode,'H');
//        System.out.println(node2.val);
//        BTNode node3=binaryTree.isExist(btNode,'G');
//        System.out.println(node3.val);
//        BTNode node4=binaryTree.isExist(btNode,'M');
//        System.out.println(node4.val);

        System.out.println(binaryTree.isCompleteTree(btNode));

    }
}
